package test04;

import java.io.*;

/**
 * Created by JAVA on 2017/11/17.
 */
public class Test04 {
    public static void main(String[] args) {
        String path = "D:\\source.High.mp3 ";
        try{
            BufferedReader reader = new BufferedReader(new FileReader(path));
            String line = " ";
            line = reader.readLine();
            System.out.println(line);
            reader.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        File file = new File("D:\\");
        file.listFiles();
        for (File f : file.listFiles()) {
            if (f.isDirectory()) {
                System.out.println("目录：" + f.getName());
            }
            if (f.isFile()) {
                System.out.println("文件：" + f.getName());
            }
            System.out.println(f.listFiles());
        }
    }
}
